<?php
    if ($_FILES["profile-photo-upload"]["error"] > 0)
        echo "Error " . $_FILES["profile-photo-upload"]["error"];
    else {
        $dest = '../../img/users/' . $_POST['file'];

        if(!move_uploaded_file($_FILES["profile-photo-upload"]["tmp_name"], $dest))
            echo "Error 服务器拒绝接受文件";
        else 
            echo "Success /img/users/" . $_POST['file'];
    }
?>